package com.ssh.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.opensymphony.xwork2.ActionSupport;
import com.ssh.entity.Address_List;
import com.ssh.service.UserService;

public class GetOneAction extends ActionSupport {
	@Autowired
	private UserService userService;
	public String selectOne(){
		HttpServletRequest request=ServletActionContext.getRequest();
		Integer id=Integer.parseInt(request.getParameter("id"));
		Address_List al=userService.selectOne(id);
		HttpSession session=request.getSession();
		session.setAttribute("al", al);
		return "getone";
	}
	
}
